package com.airticketbooking.service;

import com.airticketbooking.common.domain.PageQuery;
import com.airticketbooking.dto.UserDTO;
import com.airticketbooking.po.User;
import com.airticketbooking.vo.UserPageVO;
import com.airticketbooking.vo.UserVO;
import com.github.pagehelper.Page;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.math.BigDecimal;

/**
 * @author Mr.J
 * @version 1.0.0
 * @date 2024/11/11
 * @desc
 */
public interface UserService {


	void add(User user);

	void modify(UserDTO userDTO);

	User getUserById(Integer userId);

	Page<UserPageVO> getUserByPage(PageQuery pageQuery);


	void openOrBanUser(Integer userId);

	void changePassword(@NotBlank(message = "旧密码不能为空") @Size(min = 6, max = 20, message = "密码长度必须在6到20个字符之间") String oldPassword, @NotBlank(message = "新密码不能为空") @Size(min = 6, max = 20, message = "密码长度必须在6到20个字符之间") String newPassword, @NotBlank(message = "新密码不能为空") @Size(min = 6, max = 20, message = "密码长度必须在6到20个字符之间") String rePassword);

	void register(@NotBlank(message = "用户名不能为空") @Size(min = 3, max = 20, message = "用户名长度必须在3到20个字符之间") String userName, @NotBlank(message = "密码不能为空") @Size(min = 6, max = 20, message = "密码长度必须在6到20个字符之间") String password);

	UserVO login(String username, String password);

	void updateUserInfo(UserDTO userDTO);

	void updateUserAvatar(String avatarUrl);

	void recharge(BigDecimal amount);
}
